package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.bean.model.ShopCompany;
import com.dlc.shop.bean.vo.ShopCompanyVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author lth
 * @Date 2021/8/3 15:05
 */
public interface ShopCompanyMapper extends BaseMapper<ShopCompany> {

    /**
     * 更新工商信息的影印件信息
     * @param shopCompanyVO
     */
    void updateIdCardById(@Param("shopCompany") ShopCompanyVO shopCompanyVO);

    /**
     * 更新正常的商家工商信息为待审核
     */
    void updateStatusToWaitAudit();

    /**
     * 根据店铺id获取店铺工商信息
     * @param shopId
     * @param status
     * @return
     */
    ShopCompanyVO getShopCompanyByShopIdAndStatus(@Param("shopId") Long shopId, @Param("status") Integer status);

    /**
     * 查询店铺最近创建的工商信息状态
     * @param shopId
     * @return
     */
    Integer getLatestRecord(Long shopId);

    /**
     * 根据信用编码查询对应的店铺Id
     * @param creditCode
     * @return
     */
    List<Long> getShopIdByCreditCode(@Param("creditCode") String creditCode);
}
